/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./src/**/*.{html,js,ts,jsx,tsx}",
    "./src/pages/**/*.{html,js,ts,jsx,tsx}",
    "./src/components/**/*.{html,js,ts,jsx,tsx}",
  ],
  darkMode: "class",
  theme: {
    extend: {
      // 生成 1-1000px 的通用尺寸类
      spacing: {
        ...Array.from({ length: 1000 }, (_, i) => i + 1).reduce(
          (acc, i) => ({
            ...acc,
            [`${i}px`]: `${i}px`,
          }),
          {}
        ),
      },
      // 字体大小
      fontSize: {
        ...Array.from({ length: 100 }, (_, i) => i + 1).reduce(
          (acc, i) => ({
            ...acc,
            [`${i}px`]: `${i}px`,
          }),
          {}
        ),
      },
      // 行高
      lineHeight: {
        ...Array.from({ length: 100 }, (_, i) => i + 1).reduce(
          (acc, i) => ({
            ...acc,
            [`${i}px`]: `${i}px`,
          }),
          {}
        ),
      },
      // 边框圆角
      borderRadius: {
        ...Array.from({ length: 100 }, (_, i) => i + 1).reduce(
          (acc, i) => ({
            ...acc,
            [`${i}px`]: `${i}px`,
          }),
          {}
        ),
      },
      // 主题颜色
      colors: {
        primary: "var(--primary)",
        secondary: "var(--secondary)",
        background: "var(--background)",
        text: "var(--text)",
        border: "var(--border)",
      },
    },
  },
  plugins: [],
  corePlugins: {
    preflight: false,
  },
};
